<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>留言--软卡资源网</title>
    <script type="text/javascript" src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
    <script type="text/javascript" th:src="@{/public/jquery/jquery-1.9.1.min.js}"></script>
    <script type="text/javascript" th:src="@{/public/swiper/js/swiper.js}"></script>
    <link rel="stylesheet" th:href="@{/public/layui/css/layui.css}" />
    <link rel="stylesheet" th:href="@{/public/css/common.css}" />
    <link rel="stylesheet" th:href="@{/public/swiper/css/swiper.min.css}" />
</head>

<body>

<div class="layui-bg-blue header">
    <div class="layui-container r-pading ">
        <div class="r-logo  ">
            LOGO
        </div>
        <ul class="layui-nav r-nav layui-hide-xs" >
            <li class="layui-nav-item ">
                <a href="/">首页</a>
            </li>
            <li class="layui-nav-item" >
                <a href="/resouceContent/index/1">文章</a>
            </li>
            <li class="layui-nav-item">
                <a href="/resouceContent/index/2">视频</a>
            </li>
            <li class="layui-nav-item">
                <a href="/resouceContent/index/3">软件</a>
            </li>
            <li class="layui-nav-item layui-this">
                <a href="/message/index">留言</a>
            </li>
            <li class="layui-nav-item">
                <a href="/about/index">关于我们</a>
            </li>
        </ul>
        <div  class="houtai">
            <a href="/admin/login.html" style="color: #fff;font-weight: bold;">后台管理</a>
        </div>
        <div class="layui-show-xs r-header-right" id="menus-go">
            <i class="layui-icon">&#xe66b;</i>
        </div>
    </div>

    <div class="layui-show-xs ydl-seacher">
        <input type="search" class="ydl-seacher-input" placeholder="搜索" />
        <i  class="layui-icon layui-icon-search ydl-seacher-btn"></i>
    </div>
</div>


<div class="mobile-menus">
    <div class="swilper-main">
        <div class="swiper-container">
            <div class="swiper-wrapper">
                <div class="swiper-slide active" onclick="window.location.href='/'">首页</div>
                <div class="swiper-slide" onclick="window.location.href='/resouceContent/index/1'">文章</div>
                <div class="swiper-slide" onclick="window.location.href='/resouceContent/index/2'">视频</div>
                <div class="swiper-slide" onclick="window.location.href='/resouceContent/index/3'">软件</div>
                <div class="swiper-slide" onclick="window.location.href='/message/index'">留言</div>
                <div class="swiper-slide" onclick="window.location.href='/about/index'">关于我们</div>
            </div>
        </div>
    </div>
</div>

<div class="layui-container ">
    <div class="layui-row jianju layui-hide-xs">
					<span class="layui-breadcrumb">
					  <a href="/">首页</a>
                      <a  th:href="@{/message/index}" >
                          <cite>
                          <span> 留言区</span>
                         </cite>
                      </a>
					</span>
    </div>
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md8 ">
            <div class="layui-card" style="overflow: hidden;">

                <div class="layui-card-body">
                    <textarea id="message" style="display: none;"></textarea>
                    <button class="layui-btn layui-btn-danger r-btn layui-submit layui-unselect" onclick="submitMsg()">提交留言</button>
                </div>

            </div>
        </div>


        <div class="layui-col-md4">

            <div class="layui-card layui-hide-xs">
                <div class="layui-card-body">
                    <form action="/home/article/seacher" method="get">
                        <div class="layui-inline">
                            <input class="layui-input" name="keyword" autocomplete="off" placeholder="关键词" >
                        </div>
                        <button class="layui-btn" type="submit">搜索</button>
                    </form>
                </div>
            </div>

            <div class="layui-card layui-hide-xs">
                <div class="layui-card-header">
                    热门标签
                </div>
                <div class="layui-card-body tags">
                    <a th:each="m:${application.allNewsLableList}" class="animated3" th:href="@{'/resouceContent/lable/'+${m.id}}" th:style="'background-color: '+${m.color}" th:text="${m.name}"></a>
                </div>
            </div>

            <div class="layui-card layui-hide-xs">

                <div class="layui-card-header ms-top">
                    <ul class="hd" id="tab">
                        <li data-id="1" class="active"><a href="javascript:void (0)">点击排行</a></li>
                        <li data-id="2" ><a href="javascript:void (0)">最新文章</a></li>
                    </ul>
                </div>
                <div class="layui-card-body">
                    <ul class="news-list" id="tab-1">
                        <li th:each="vo,statuts:${application.clicktArticleList}">
                            <span class="layui-badge" th:if="${statuts.count} == 1" th:text="${statuts.count}">1</span>
                            <span class="layui-badge layui-bg-green" th:if="${statuts.count} == 2" th:text="${statuts.count}">2</span>
                            <span class="layui-badge layui-bg-cyan" th:if="${statuts.count} == 3" th:text="${statuts.count}">3</span>
                            <span class="layui-badge layui-bg-gray" th:if="${statuts.count} >=4" th:text="${statuts.count}">4</span>
                            <a th:href="@{'/resouceContent/details/'+${vo.id}}" th:text="${vo.title}">ECS云服务器2折起，优惠配置多选1</a>
                        </li>
                    </ul>

                    <ul class="news-list" id="tab-2" style="display: none;">
                        <li th:each="vo,statuts:${application.newsArticleList}">
                            <span class="layui-badge" th:if="${statuts.count} == 1" th:text="${statuts.count}">1</span>
                            <span class="layui-badge layui-bg-green" th:if="${statuts.count} == 2" th:text="${statuts.count}">2</span>
                            <span class="layui-badge layui-bg-cyan" th:if="${statuts.count} == 3" th:text="${statuts.count}">3</span>
                            <span class="layui-badge layui-bg-gray" th:if="${statuts.count} >=4" th:text="${statuts.count}">4</span>
                            <a th:href="@{'/resouceContent/details/'+${vo.id}}" th:text="${vo.title}">ECS云服务器2折起，优惠配置多选1</a>
                        </li>
                    </ul>
                </div>

            </div>

            <div class="layui-card layui-hide-xs">

                <div class="layui-card-header ">
                    推荐视频
                </div>
                <div class="layui-card-body">
                    <ul class="voide-list">
                        <li th:each="vo:${application.recommendVideoList}">
                            <a th:href="@{'/resouceContent/details/'+${vo.id}}" >
                                <img onerror="javascript:this.src='/public/images/nopic.png'" th:src="@{''+${vo.thumbnailImg}}" th:title="${vo.title}">
                                <b  th:text="${vo.title}">乐山大佛闭眼事件 惊天骇闻大..</b>
                                <div th:text="${vo.summary}" th:title="${vo.summary}" class="home-content"></div>
                            </a>
                            <p>
										<span class="tutime">
											<i class="layui-icon layui-icon-log"></i>
											<span th:text="${#dates.format(vo.addTime,'yyyy-MM-dd')}"></span>
										</span>
                            </p>
                        </li>
                    </ul>
                </div>

            </div>


            <div class="layui-card layui-hide-xs">
                <div class="layui-card-header">
                    友情链接
                </div>
                <div class="layui-card-body">
                    <a th:each="m:${application.allList}" th:href="${m.url}" target="_blank" style="margin: 0 5px" th:text="${m.name}"></a>
                </div>
            </div>

        </div>
    </div>
</div>

<div class="footer-r">
    <p>
        © 2018-2022 xxxx 版权所有，保留所有权利。<br>版权声明：部分文章摘自互联网，如有侵权，麻烦告知删除，谢谢。
    </p>
</div>
<script type="text/javascript" th:src="@{/public/layui/layui.all.js}"></script>
<script type="text/javascript" th:src="@{/public/js/index.js}"></script>
<script type="text/javascript">
    var index;
    var layedit;
    var layer;
    layui.use(['layedit','layer'], function(){
        layedit = layui.layedit;
        layer=layui.layer;
        index=layedit.build('message',{
        }); //建立编辑器
    });

    function submitMsg(){
        var content=layedit.getContent(index);
        var text=layedit.getText(index);
        if(text==""){
            layer.msg("请输入留言信息！");
            return ;
        }

        var data={ip:returnCitySN.cip,address:returnCitySN.cname,content:content};
        $.post("/message/save",data,function(resultObj){
            $('#LAY_layedit_1').contents().find('body').html('');
            layer.msg(resultObj.msg);
        });
    }
</script>
</body>

</html>